package com.weijianhuawen.wjblog.common.validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @version: java version 17
 * @Author: weijianhuawen
 * @description:
 * @date: 2025-04-26 18:16
 */
public class QQValidator implements ConstraintValidator<QQAccount, String> {
    @Override
    public void initialize(QQAccount constraintAnnotation) {

    }

    @Override
    public boolean isValid(String qq, ConstraintValidatorContext constraintValidatorContext) {
        // 校验逻辑
        return qq!= null && qq.matches("^[1-9][0-9]{4,10}$");
    }
}
